package com.example.administrator.familfinalcialmanagement.greendao.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.example.administrator.familfinalcialmanagement.bean.CommonUser;
import com.example.administrator.familfinalcialmanagement.bean.JaveTeacher;
import com.example.administrator.familfinalcialmanagement.bean.SuperManager;

import com.example.administrator.familfinalcialmanagement.greendao.gen.CommonUserDao;
import com.example.administrator.familfinalcialmanagement.greendao.gen.JaveTeacherDao;
import com.example.administrator.familfinalcialmanagement.greendao.gen.SuperManagerDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig commonUserDaoConfig;
    private final DaoConfig javeTeacherDaoConfig;
    private final DaoConfig superManagerDaoConfig;

    private final CommonUserDao commonUserDao;
    private final JaveTeacherDao javeTeacherDao;
    private final SuperManagerDao superManagerDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        commonUserDaoConfig = daoConfigMap.get(CommonUserDao.class).clone();
        commonUserDaoConfig.initIdentityScope(type);

        javeTeacherDaoConfig = daoConfigMap.get(JaveTeacherDao.class).clone();
        javeTeacherDaoConfig.initIdentityScope(type);

        superManagerDaoConfig = daoConfigMap.get(SuperManagerDao.class).clone();
        superManagerDaoConfig.initIdentityScope(type);

        commonUserDao = new CommonUserDao(commonUserDaoConfig, this);
        javeTeacherDao = new JaveTeacherDao(javeTeacherDaoConfig, this);
        superManagerDao = new SuperManagerDao(superManagerDaoConfig, this);

        registerDao(CommonUser.class, commonUserDao);
        registerDao(JaveTeacher.class, javeTeacherDao);
        registerDao(SuperManager.class, superManagerDao);
    }
    
    public void clear() {
        commonUserDaoConfig.clearIdentityScope();
        javeTeacherDaoConfig.clearIdentityScope();
        superManagerDaoConfig.clearIdentityScope();
    }

    public CommonUserDao getCommonUserDao() {
        return commonUserDao;
    }

    public JaveTeacherDao getJaveTeacherDao() {
        return javeTeacherDao;
    }

    public SuperManagerDao getSuperManagerDao() {
        return superManagerDao;
    }

}
